<div class="row">
    <div class="col-12">
        <h1>@Model.Title</h1>
        <p>
            @Model.Excerpt
        </p>
    </div>
    <div class="col-12">
        @Html.Raw(Model.Content)
    </div>

    @if (Model.Articles.TotalItems > 0)
    {

        <div class="col-12">
            @foreach (var item in Model.Articles.Items)
            {
                <h1>@item.Article.Title</h1>
                @item.Article.Excerpt
            }
            @if (Model.Articles.PageSize.HasValue)
            {

                await Html.PartialAsync("../Widgets/_Pagination.cshtml", Model.Articles
                                              , new ViewDataDictionary(this.ViewData) {
                                    { "PageSize", Model.Articles.PageSize },
                                    { "PageIndex", Model.Articles.PageIndex },
                                    { "TotalPage", Model.Products.TotalPage }
                                              });
           }
        </div>
    }

    @if (Model.Products.TotalItems > 0)
    {
        <div class="col-12">
            @foreach (var item in Model.Products.Items)
            {
                <h1>@item.Product.Title</h1>
                @item.Product.Excerpt
            }
            @if (Model.Articles.PageSize.HasValue)
            {
                await Html.PartialAsync("../Widgets/_Pagination.cshtml", Model.Products
                                          , new ViewDataDictionary(this.ViewData) {
                                        { "PageSize", Model.Products.PageSize },
                                        { "PageIndex", Model.Products.PageIndex },
                                        { "TotalPage", Model.Products.TotalPage }
                                          });
            }
        </div>
    }
</div>
